<template>
  <el-dialog v-dialogDrag title="特别说明事项" :visible="isShowmatte" width="50%" @close="dialogClose">
    <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="110px">
      <el-table :data="tableData" style="width: 100%" max-height="250">
        <el-table-column fixed prop="Matter" label="特别说明事项">
        </el-table-column>
        <el-table-column fixed="right"  width="120">
          <template slot-scope="scope">
            <el-button @click.native.prevent="deleteRow(scope.$index, tableData)" type="text" size="small">
              删除
            </el-button>
          </template>
        </el-table-column>
      </el-table>

    </el-form>

    <span slot="footer" class="dialog-footer">
      <el-button @click="dialogClose">取 消</el-button>
      <el-button type="primary" @click="submitForm()">确 定</el-button>
    </span>

  </el-dialog>
</template>

<script>
export default {
  data() {
    return {
      tableData: [{
        Matter: '一、本公司承诺不向他人提供或公开本报告书内容',
      }, {
        Matter: '二、鉴定评估申请人及被鉴定评估相关当事人，对未能提供本次鉴定评估所需的检材等承担不利后果',
      },]
    }
  },

props: {
  isShowmatte: {
    type: Boolean
  }
},

methods: {
  deleteRow(index, rows) {
    rows.splice(index, 1);
  },

  dialogClose() {
    this.$emit('dialogClose')
  },
  submitForm() {
    this.$refs.ruleForm.validate((valid) => {
      if (!valid) {
        return
      }
      else {
        this.$emit('dialogClose')
      }
    });
  },
  handleRemove(file, fileList) {
    // console.log(file, fileList);
  },
  handlePictureCardPreview(file) {
    this.dialogImageUrl = file.url;
    this.dialogVisible = true;
  }
}
}



</script>

<style>

</style>
